import File from './File';
import Context from '../Context';
import { appendExt, joinPath } from '../Utils';

export default class BundleFile extends File {
    public readonly type = FileType.bundle;
    public files: File[] = [];

    constructor(cx: Context, id: string) {
        super(cx, { id: appendExt(id, '.bundle.js') });
    }

    public async doLoad() {
        this.contents = this.files.filter(f => f._contents).map(f => f.contents).join('\n');
    }
}
